// TestArcLog.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "../ArcLog/Log.h"
#include <iostream>

void testNDCIner(){
	ArcLogNDCPush(__FUNCTION__);
	ArcLogA(100, "message 2");
	ArcLogNDCPop();
};

void testNDC() {
	ArcLogNDCPush(__FUNCTION__);
	ArcLogA(100, "message 1");
	testNDCIner();
	ArcLogNDCPop();
}

int _tmain(int argc, _TCHAR* argv[])
{
	if(!ArcInitializeLogSystem("./log4cpp.property"))
	{
		char buffer[1024];
		ArcLogGetErrorMessage(buffer, sizeof(buffer));
		printf("Error : %s\n", buffer);

		return 0;
	}

	ArcLog(0, "xxxx123");
	ArcLog(102, "xxxx");
	ArcLog(104, "xxxx");
	ArcLogW(0, L"sss");
	ArcCategoryLog(100, "sub1", "xxxx");
	ArcCategoryLog(100, "subNT", "xxxx");
	ArcCategoryLog(100, "subNT111", "xxxx");
	
	testNDC();
	return 0;
}

